home *** CD-ROM | disk | FTP | other *** search
/ Champak 109 / Vol 109.iso / games / fried_ic.swf / scripts / DefineSprite_399 / frame_1 / DoAction.as
Encoding:
Text File  |  2008-11-12  |  8.9 KB  |  434 lines

  1. function rePress()
  2. {
  3.    gee.onRelease = function()
  4.    {
  5.       bridgeDoor.gotoAndPlay(14);
  6.       this._visible = false;
  7.       Mouse.show();
  8.       delete gee.onPress;
  9.    };
  10. }
  11. stop();
  12. mixer._visible = false;
  13. geeMix._visible = false;
  14. geePowder._visible = false;
  15. crumbCup._visible = false;
  16. iceBridge._visible = false;
  17. stove.tunner.enabled = false;
  18. crumbCup01._visible = false;
  19. rr._visible = false;
  20. var depths = 10;
  21. var i = 2;
  22. while(i <= 17)
  23. {
  24.    eval("ins" + i)._visible = false;
  25.    i++;
  26. }
  27. gee.onPress = function()
  28. {
  29.    ins1._visible = false;
  30.    if(bridgeDoor._currentframe == 13)
  31.    {
  32.       rePress();
  33.    }
  34.    this.swapDepths(depths);
  35.    this.startDrag();
  36.    Mouse.hide();
  37.    updateAfterEvent();
  38.    this.onMouseMove = function()
  39.    {
  40.       if(bridgeDoor.doorClose.hitTest(this))
  41.       {
  42.          bridgeDoor.gotoAndPlay(2);
  43.          Mouse.show();
  44.       }
  45.    };
  46. };
  47. _global.Crumb = function()
  48. {
  49.    crumb.onPress = function()
  50.    {
  51.       ins2._visible = false;
  52.       this.swapDepths(depths);
  53.       Mouse.hide();
  54.       this.startDrag();
  55.    };
  56.    crumb.onRelease = function()
  57.    {
  58.       if(bowl.hitTest(this))
  59.       {
  60.          Mouse.show();
  61.          stopDrag();
  62.          this.gotoAndPlay(2);
  63.          this._x = -151;
  64.          this._y = 8;
  65.          depths++;
  66.       }
  67.    };
  68. };
  69. _global.Vennila = function()
  70. {
  71.    vennila.onPress = function()
  72.    {
  73.       ins3._visible = false;
  74.       this.swapDepths(depths);
  75.       this.startDrag();
  76.       Mouse.hide();
  77.    };
  78.    vennila.onRelease = function()
  79.    {
  80.       if(bowl.hitTest(this))
  81.       {
  82.          this.gotoAndPlay(2);
  83.          Mouse.show();
  84.          stopDrag();
  85.          this._x = -181;
  86.          this._y = 40;
  87.          depths++;
  88.       }
  89.    };
  90. };
  91. _global.Egg = function()
  92. {
  93.    egg.onPress = function()
  94.    {
  95.       ins4._visible = false;
  96.       this.swapDepths(depths);
  97.       this.startDrag();
  98.       Mouse.hide();
  99.    };
  100.    egg.onRelease = function()
  101.    {
  102.       if(bowl.hitTest(this))
  103.       {
  104.          stopDrag();
  105.          Mouse.show();
  106.          egg.gotoAndPlay(2);
  107.          this._x = 260;
  108.          this._y = 25;
  109.          depths++;
  110.       }
  111.    };
  112. };
  113. _global.Mixer = function()
  114. {
  115.    mixer.onPress = function()
  116.    {
  117.       ins5._visible = false;
  118.       mixer.nextFrame();
  119.       crumb.nextFrame();
  120.       vennila.nextFrame();
  121.       egg._visible = false;
  122.       crumb._visible = false;
  123.       if(mixer._currentframe == mixer._totalframes)
  124.       {
  125.          this.enabled = false;
  126.          OpenDoor();
  127.       }
  128.    };
  129. };
  130. OpenDoor = function()
  131. {
  132.    bridgeDoor.onPress = function()
  133.    {
  134.       ins6._visible = false;
  135.       bridgeDoor.nextFrame();
  136.    };
  137. };
  138. var dpths = 100;
  139. _global.IceCream = function()
  140. {
  141.    bridgeDoor.iceCream.onPress = function()
  142.    {
  143.       gee.swapDepths(depths);
  144.       gee._visible = true;
  145.       gee.startDrag();
  146.       this._visible = false;
  147.       gee._x = -85;
  148.       gee._y = -123;
  149.    };
  150.    gee.onRelease = function()
  151.    {
  152.       if(hitAra.hitTest(this))
  153.       {
  154.          ins7._visible = true;
  155.          bridgeDoor.nextFrame();
  156.          delete bridgeDoor.iceCream.onPress;
  157.          delete gee.onRelease;
  158.          stopDrag();
  159.          depths++;
  160.          GeeGee();
  161.       }
  162.    };
  163. };
  164. GeeGee = function()
  165. {
  166.    gee.enabled = true;
  167.    gee.geeIn.enabled = true;
  168.    gee.geeIn.onPress = function()
  169.    {
  170.       ins7._visible = false;
  171.       this.swapDepths(depths);
  172.       Mouse.hide();
  173.       this.startDrag();
  174.    };
  175.    gee.geeIn.onRelease = function()
  176.    {
  177.       if(bowl.hitTest(this))
  178.       {
  179.          this._visible = false;
  180.          geeMix._visible = true;
  181.          Mouse.show();
  182.          depths++;
  183.          GeeMix();
  184.       }
  185.    };
  186. };
  187. GeeMix = function()
  188. {
  189.    geeMix.onPress = function()
  190.    {
  191.       ins8._visible = false;
  192.       this.nextFrame();
  193.       if(geeMix._currentframe == geeMix._totalframes)
  194.       {
  195.          GEEgeeMix();
  196.       }
  197.    };
  198. };
  199. GEEgeeMix = function()
  200. {
  201.    geeMix.onPress = function()
  202.    {
  203.       ins9._visible = false;
  204.       this.swapDepths(depths);
  205.       Mouse.hide();
  206.       this.startDrag();
  207.    };
  208.    geeMix.onRelease = function()
  209.    {
  210.       if(crumbPowder.hitTest(this))
  211.       {
  212.          stopDrag();
  213.          this._visible = false;
  214.          geePowder._visible = true;
  215.          Mouse.show();
  216.          delete geeMix.onPress;
  217.          delete geeMix.onRelease;
  218.          depths++;
  219.          GeePowder();
  220.       }
  221.    };
  222. };
  223. GeePowder = function()
  224. {
  225.    geePowder.onPress = function()
  226.    {
  227.       this.nextFrame();
  228.       if(geePowder._currentframe == geePowder._totalframes)
  229.       {
  230.          GeePowderMix();
  231.       }
  232.    };
  233. };
  234. GeePowderMix = function()
  235. {
  236.    geePowder.onPress = function()
  237.    {
  238.       ins8._visible = false;
  239.       this.swapDepths(depths);
  240.       Mouse.hide();
  241.       this.startDrag();
  242.    };
  243.    geePowder.onRelease = function()
  244.    {
  245.       if(hitAraa.hitTest(this))
  246.       {
  247.          ins10._visible = true;
  248.          stopDrag();
  249.          Mouse.show();
  250.          this._visible = false;
  251.          crumbCup._visible = true;
  252.          gee._visible = false;
  253.          iceBridge._visible = true;
  254.          bridgeDoor._visible = false;
  255.          delete geePowder.onPress;
  256.          delete geePowder.onRelease;
  257.          depths++;
  258.          CrumbCup();
  259.       }
  260.    };
  261. };
  262. CrumbCup = function()
  263. {
  264.    function rePress01()
  265.    {
  266.       crumbCup.onRelease = function()
  267.       {
  268.          iceBridge.gotoAndPlay(14);
  269.          this._visible = false;
  270.          Mouse.show();
  271.          delete crumbCup.onPress;
  272.          delete crumbCup.onRelease;
  273.          crumb._visible = false;
  274.          crumbCup._visible = false;
  275.          crumbPowder._visible = false;
  276.          bowl._visible = false;
  277.          eggCup._visible = false;
  278.          vennila._visible = false;
  279.          mixer._visible = false;
  280.       };
  281.    }
  282.    crumbCup.onPress = function()
  283.    {
  284.       ins10._visible = false;
  285.       if(iceBridge._currentframe == 13)
  286.       {
  287.          rePress01();
  288.       }
  289.       this.swapDepths(depths);
  290.       this.startDrag();
  291.       Mouse.hide();
  292.       updateAfterEvent();
  293.       this.onMouseMove = function()
  294.       {
  295.          if(iceBridge.doorClose.hitTest(this))
  296.          {
  297.             iceBridge.gotoAndPlay(2);
  298.             Mouse.show();
  299.          }
  300.       };
  301.    };
  302. };
  303. _global.Stove = function()
  304. {
  305.    stove.onPress = function()
  306.    {
  307.       ins11._visible = false;
  308.       this.swapDepths(depths);
  309.       Mouse.hide();
  310.       this.startDrag();
  311.    };
  312.    stove.onRelease = function()
  313.    {
  314.       if(hitstove.hitTest(this))
  315.       {
  316.          ins12._visible = true;
  317.          stopDrag();
  318.          Mouse.show();
  319.          this._x = 23;
  320.          this._y = 77;
  321.          delete stove.onPress;
  322.          delete stove.onRelease;
  323.          depths++;
  324.          Oil();
  325.       }
  326.    };
  327. };
  328. Oil = function()
  329. {
  330.    oil.onPress = function()
  331.    {
  332.       ins12._visible = false;
  333.       this.swapDepths(depths);
  334.       this.startDrag();
  335.    };
  336.    oil.onRelease = function()
  337.    {
  338.       if(stove.hitTest(this))
  339.       {
  340.          this.gotoAndPlay(2);
  341.          stopDrag();
  342.          this._x = 200;
  343.          this._y = 75;
  344.          depths++;
  345.       }
  346.    };
  347. };
  348. _global.OpenDoorIce = function()
  349. {
  350.    iceBridge.onPress = function()
  351.    {
  352.       ins14._visible = false;
  353.       iceBridge.nextFrame();
  354.       onEnterFrame = function()
  355.       {
  356.          if(iceBridge._currentframe == 35)
  357.          {
  358.             delete onEnterFrame;
  359.             iceBridge.enabled = false;
  360.             crumbCup01._visible = true;
  361.             IceCream00();
  362.          }
  363.       };
  364.    };
  365. };
  366. IceCream00 = function()
  367. {
  368.    crumbCup01.onPress = function()
  369.    {
  370.       this.swapDepths(depths);
  371.       Mouse.hide();
  372.       this.startDrag();
  373.       iceBridge.nextFrame();
  374.    };
  375.    crumbCup01.onRelease = function()
  376.    {
  377.       if(hitAra.hitTest(this))
  378.       {
  379.          ins15._visible = true;
  380.          stopDrag();
  381.          Mouse.show();
  382.          delete crumbCup01.onRelease;
  383.          delete crumbCup01.onPress;
  384.          depths++;
  385.          Fried();
  386.       }
  387.    };
  388. };
  389. Fried = function()
  390. {
  391.    crumbCup01.biscut.onPress = function()
  392.    {
  393.       ins15._visible = false;
  394.       this.swapDepths(depths);
  395.       this.startDrag();
  396.    };
  397.    crumbCup01.biscut.onRelease = function()
  398.    {
  399.       if(hitstove.hitTest(this))
  400.       {
  401.          ins16._visible = true;
  402.          stopDrag();
  403.          this._visible = false;
  404.          rr._visible = true;
  405.          rr.swapDepths(depths);
  406.          depths++;
  407.          Spoon();
  408.       }
  409.    };
  410. };
  411. Spoon = function()
  412. {
  413.    delete crumbCup01.biscut.onRelease;
  414.    delete crumbCup01.biscut.onPress;
  415.    spoon.onPress = function()
  416.    {
  417.       ins16._visible = false;
  418.       this.swapDepths(depths);
  419.       this.startDrag();
  420.    };
  421.    spoon.onRelease = function()
  422.    {
  423.       if(stove.hitTest(this))
  424.       {
  425.          rr._visible = false;
  426.          stopDrag();
  427.          this._x = 45.7;
  428.          this._y = 3;
  429.          spoon.nextFrame();
  430.          depths++;
  431.       }
  432.    };
  433. };
  434.